package com.zqp.web.anync;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
* @author zqp
* @date 2017年12月19日 
* @description 
*/
@Component
public class MockQueue {
	private Logger logger = LoggerFactory.getLogger(getClass());
	private String placeOrder;
	private String complateOrder;
	public String getPlaceOrder() {
		return placeOrder;
	}
	
	public void setPlaceOrder(String placeOrder) throws Exception {
		new Thread(()->{
			logger.info("借到下单请求" + placeOrder);
				try {
					Thread.sleep(1000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			this.complateOrder = placeOrder;
			logger.info("借到下单请求完毕" + placeOrder);
			
		}).start(); 
		
		
	}
	public String getComplateOrder() {
		return complateOrder;
	}
	public void setComplateOrder(String complateOrder) {
		this.complateOrder = complateOrder;
	}
	
	
}
